﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.IO;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


using FXnaEngine.Graphics;







namespace FXnaEngine
{





    public abstract class FShaderEffect:IDisposable
    {





        /// <summary>
        /// Effect
        /// </summary>
        protected Effect effect = null;



        /// <summary>
        /// Is this shader valid to render? If not we can't perform any rendering.
        /// </summary>
        /// <returns>Bool</returns>
        public bool Valid
        {
            get
            {
                return effect != null;
            }
        }






        #region  公用方法
      

  
        /// <summary>
        /// Set parameters, this overload sets all material parameters too.
        /// </summary>
        public virtual void SetParameters(FMaterial setMat,Matrix world)
        {





        }


        public void Render(string techniqueName)
        {



 

        }
       
        


   
        #endregion



        #region Dispose
        /// <summary>
        /// Dispose
        /// </summary>
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        /// <summary>
        /// Dispose
        /// </summary>
        /// <param name="disposing">Disposing</param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Dispose shader effect
                if (effect != null)
                    effect.Dispose();
            }
        }
        #endregion





    }
}
